﻿Module modTreeContent

    Public Sub BuildTree(ByVal argTreeView As TreeView)

        Dim root As TreeNode
        root = AddNewNode(argTreeView, "0", "Tree Title", "", "")

        Dim parent As TreeNode
        Dim node101 As TreeNode

        parent = AddNewNode(root, "1", "Procedure")
        node101 = parent
        AddNewNode(parent, "1.1", "Step 1 - Configure")
        AddNewNode(parent, "1.2", "Step 2 - Connect")
        AddNewNode(parent, "1.3", "Step 3 - Monitor")
        AddNewNode(parent, "1.4", "Step 4 - Experiment")
        AddNewNode(parent, "1.5", "Step 5 - Automate")
        AddNewNode(parent, "1.6", "Step 6 - Customize")

        parent = AddNewNode(root, "2", "Manometer HD750")
        AddNewNode(parent, "2.1", "55aa01 - Ready to receive data")
        AddNewNode(parent, "2.2", "55aa02 - Cutoff pressure meter communication")
        AddNewNode(parent, "2.3", "55aa03 - Turn off meter")

        parent = AddNewNode(root, "3", "CSZ MicroClimate Chamber")
        parent = AddNewNode(parent, "3.1", "Read from Chamber")
        AddNewNode(parent, "3.1.1", "1 3 0 0 0 1 84 A - Model number")
        AddNewNode(parent, "3.1.2", "1 3 0 1 0 1 D5 CA - SN Part 1")
        AddNewNode(parent, "3.1.3", "1 3 0 2 0 1 25 CA - SN Part 2")
        parent = parent.Parent
        AddNewNode(parent, "3.2", "Write to Chamber")
        AddNewNode(parent, "3.2.1", "1 6 1 37 0 1 F8 38 - Clear Input Errors")
        AddNewNode(parent, "3.2.2", "1 6 5 E8 6 FD CB 13  - Enable Diagnostics Mode")
        AddNewNode(parent, "3.2.3", "1 6 5 E8 0 0 9 32 - Stop Diagnostics Mode")

        With root
            .Collapse()
            .Expand()
        End With

        node101.Expand()

    End Sub

End Module

